﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UniversitySolution
{
    class Chair
    {
        public string name;
        public List<Group> groups = new List<Group>();

        public static int chairCount;

        public static Chair GenerateRandomChair()
        {
            chairCount++;
            Chair chair = new Chair();
            chair.name = "Chair" + chairCount;
            for (int i = 0; i < 3; i++)
            {
                Group grp = Group.GenerateRandomGroup();
                chair.groups.Add(grp);
            }
            return chair;
        }

        public void PrintChairToConsole()
        {
            Console.WriteLine("____________________");
            Console.WriteLine("Chair name: {0}", name);
            foreach (var group in groups)
            {
                group.PringByAveragemark();
            }
        }
    }
}
